<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Register.aspx.cs" Inherits="Register" Title="Registration Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Panel ID="pnlForm" DefaultButton="btnEnter" CssClass="form" runat="server">
        <h2>Enter your school</h2>
        <asp:ValidationSummary ID="valSummary" runat="server" DisplayMode="BulletList" HeaderText="Please correct the following errors and try again."
            ShowSummary="False" ShowMessageBox="True" />
            <asp:Panel ID="pnlErrors" CssClass="errorBox" Visible="false" EnableViewState="false" runat="server">
                <ul id="ulErrors" runat="server">
                </ul>
            </asp:Panel>
        <ul class="form">
            <li class="title first"><span class="formLabel">School Details</span> </li>
            <li class="formItem">
                <asp:Label ID="Label13" CssClass="formLabel" Text="School Name:" AssociatedControlID="txtSchoolName"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtSchoolName" runat="server" />
                    <asp:RequiredFieldValidator ID="valSchoolName" ErrorMessage="School Name is required"
                        ControlToValidate="txtSchoolName" Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label1" CssClass="formLabel" Text="School Type:" AssociatedControlID="ddlType"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:DropDownList ID="ddlType" runat="server">
                        <asp:ListItem Text="" Value="0" />
                        <asp:ListItem Text="Primary" Value="1" />
                        <asp:ListItem Text="Middle" Value="2" />
                        <asp:ListItem Text="Secondary" Value="3" />
                    </asp:DropDownList>
                    <asp:CompareValidator ID="valType" ErrorMessage="School Type is required" ControlToValidate="ddlType"
                        Operator="GreaterThan" Type="Integer" ValueToCompare="0" Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label2" CssClass="formLabel" Text="Address:" AssociatedControlID="txtAddress1"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtAddress1" runat="server" />
                    <asp:RequiredFieldValidator ID="valAddress1" ErrorMessage="School Address is required"
                        ControlToValidate="txtAddress1" Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem"><span class="input">
                <asp:TextBox ID="txtAddress2" runat="server" /></span> </li>
            <li class="formItem"><span class="input">
                <asp:TextBox ID="txtAddress3" runat="server" /></span> </li>
            <li class="formItem">
                <asp:Label ID="Label3" CssClass="formLabel" Text="Town:" AssociatedControlID="txtTown"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtTown" runat="server" />
                    <asp:RequiredFieldValidator ID="valTown" ErrorMessage="School Town is required" ControlToValidate="txtTown"
                        Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label14" CssClass="formLabel" Text="County:" AssociatedControlID="txtCounty"
                    runat="server" />
                <span class="input">
                    <asp:TextBox ID="txtCounty" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label4" CssClass="formLabel" Text="Post Code:" AssociatedControlID="txtTown"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtPostCode" runat="server" />
                    <asp:RequiredFieldValidator ID="valPostCode" ErrorMessage="School Post Code is required"
                        ControlToValidate="txtPostCode" Display="Dynamic" runat="server" />
                    <asp:RegularExpressionValidator ID="valPostCodeFormat" ControlToValidate="txtPostCode" ErrorMessage="Invalid Post Code" Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label5" CssClass="formLabel" Text="School Tel:" AssociatedControlID="txtTown"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtSchoolTel" runat="server" />
                    <asp:RequiredFieldValidator ID="valSchoolTel" ErrorMessage="School Telehone Number is required"
                        ControlToValidate="txtSchoolTel" Display="Dynamic" runat="server" />
                </span></li>
            <li class="title"><span class="formLabel">Main Contact</span> </li>
            <li class="formItem">
                <asp:Label ID="Label6" CssClass="formLabel" Text="First Name:" AssociatedControlID="txtContactFirstName"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtContactFirstName" runat="server" />
                    <asp:RequiredFieldValidator ID="valContactFirstName" ErrorMessage="Main Contact First Name is required"
                        ControlToValidate="txtContactFirstName" Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label7" CssClass="formLabel" Text="Last Name:" AssociatedControlID="txtContactLastName"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtContactLastName" runat="server" />
                    <asp:RequiredFieldValidator ID="valContactLastName" ErrorMessage="Main Contact Last Name is required"
                        ControlToValidate="txtContactLastName" Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label8" CssClass="formLabel" Text="Email Address:" AssociatedControlID="txtContactLastName"
                    runat="server" /> (Please enter a frequently used address)<span style="color:Red">* </span>
                <span class="input">
                    <asp:TextBox ID="txtEmailAddress" runat="server" />
                    <asp:RequiredFieldValidator ID="valEmailAddress" ErrorMessage="Main Contact Email Address is required"
                        ControlToValidate="txtEmailAddress" Display="Dynamic" runat="server" />
                    <asp:RegularExpressionValidator ID="valEmailAddressFormat" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Address" Display="Dynamic" runat="server" />
                </span>
            </li>
            <li class="formItem"><span class="formLabel">
                <asp:Label ID="Label9" AssociatedControlID="txtContactTel" Text="Contact Tel:" runat="server" /> (if different from school)</span> <span class="input">
                    <asp:TextBox ID="txtContactTel" runat="server" /></span> </li>
            <li class="title"><span class="formLabel">Secondary Contact</span> </li>
            <li class="formItem">
                <asp:Label ID="Label10" CssClass="formLabel" Text="Name:" AssociatedControlID="txtSecondaryContact"
                    runat="server" />
                <span class="input">
                    <asp:TextBox ID="txtSecondaryContact" runat="server" /></span> </li>
            <li class="title"><span class="formLabel">Login</span> </li>
            <li class="formItem">
                <asp:Label ID="Label11" CssClass="formLabel" Text="Password:" AssociatedControlID="txtPassword"
                    runat="server" />- must conatin between 6 and 14 alphanumeric characters<span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtPassword" TextMode="Password" runat="server" />
                    <asp:RequiredFieldValidator ID="valPassword" ErrorMessage="Password Required" ControlToValidate="txtPassword"
                        Display="Dynamic" runat="server" />
                    <asp:RegularExpressionValidator ID="valPasswordFormat" ControlToValidate="txtPassword" ErrorMessage="Password must conatin between 6 and 14 alphanumeric characters." Display="Dynamic" runat="server" />
                </span></li>
            <li class="formItem">
                <asp:Label ID="Label12" CssClass="formLabel" Text="Confirm Password:" AssociatedControlID="txtConfirmPassword"
                    runat="server" /><span style="color:Red">*</span>
                <span class="input">
                    <asp:TextBox ID="txtConfirmPassword" TextMode="Password" runat="server" />
                    <asp:RequiredFieldValidator ID="valConfirmPassword" ErrorMessage="Confirm Password Required"
                        ControlToValidate="txtConfirmPassword" Display="Dynamic" runat="server" />
                    <asp:CompareValidator ID="valComparePassword" runat="server" ErrorMessage="Passwords do not match"
                        ControlToCompare="txtPassword" ControlToValidate="txtConfirmPassword"></asp:CompareValidator>
                </span></li>
                <li><span style="color:Red">*</span> = Compulsory Field</li>
            <li class="formItem buttons"><span class="input">
                <asp:Button ID="btnEnter" Text="Enter" runat="server" OnClick="btnEnter_Click" />
            </span></li>
        </ul>
    </asp:Panel>
    <asp:Panel ID="pnlEntry" Visible="false" runat="server">
        <h2>Thank you!</h2>
        <p>Thank you for registering your interest in the Norwich Union Climate Change Champions project.</p>
        <p>The website is currently under development, and you will be sent an email informing you when it is complete.</p>
        <p>If you have any questions please contact: <asp:HyperLink ID="HyperLink1" NavigateUrl="mailto:climatechangechampions@globalactionplan.org.uk" runat="server">climatechangechampions@globalactionplan.org.uk</asp:HyperLink></p>
    </asp:Panel>
</asp:Content>
